package com.jt.system.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jt.system.pojo.User;
import org.apache.ibatis.annotations.Mapper;


import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {

   // @Select("select id,username,password,status from tb_users where username=#{username}")
    User selectUserByUsername(String username);

    /*@Select("SELECT DISTINCT permission FROM " +
            "tb_user_roles ur " +
            "JOIN " +
            "tb_role_menus rm " +
            "ON ur.role_id=rm.role_id " +
            "JOIN " +
            "tb_menus m ON rm.menu_id=m.id " +
            "WHERE ur.user_id=#{userId}")*/
    List<String> selectUserPermissions(Long userId);
}
